﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Excell_On_Services.Models
{
    public interface IEOSRepository
    {
        Guid GetIdByUsername(string username);
        

        IQueryable<Employee> FindAllEmployees();
        IQueryable<Employee> FindEmployeesByName(string name);
        Employee FindEmployeesById(Guid employeeID);
        //Employee FindEmployeeByLoginName(string login);
        //Employee ValidateEmployee(string loginName, string password);
        void AddEmployee(Employee employee);
        void UpdateEmployee(Employee employee);
        bool DeleteEmployee(Guid employeeID);
        IQueryable<Employee> FindEmployeesInPage(int pageNumber, int pageSize);
        int GetEmployeesCount();


        IQueryable<Department> FindAllDepartments();
        IQueryable<Department> FindDepartmentByName(string name);
        Department FindDeparmentById(int departmentId);
        void AddDepartment(Department department);
        void UpdateDepartment(Department department);
        bool DeleteDepartment(int DepartmentID);
        IQueryable<Department> FindDepartmentsInPage(int pageNumber, int pageSize);
        int GetDepartmentsCount();


        void AddClient(Client client);
        void UpdateClient(Client client);
        bool DeleteClient(Guid clientID);
        IQueryable<Client> FindClientsInPage(int pageNumber, int pageSize);
        IQueryable<Client> FindClientsByName(string name);
        Client FindClientsByID(Guid ID);
        Client FindClientByUsername(string username);
        int GetClientCount();
        IQueryable<Client> SearchClient(string type, string search,int pageNumber, int pageSize);
        


        void UpdateService(Service service);
        void DeleteService(int id);
        void AddService(Service service);
        void AddServiceHaveParent(Service service, int id);
        Service FindServiceById(int id);
        int GetServiceCount();
        IQueryable<Service> GetServicesByParent(int id);
        IQueryable<Service> FindServicesInPage(int pageNumber, int pageSize);
        IQueryable<Service> FindAllServicesExpertID(int id);
        IQueryable<Service> FindAllServices();

        int GetOrdersCount();
        int GetOrdersByClientCount(string username);
        void AddOrder(OrderService order);
        void AddOrderByClient(Cart cart, Guid ClientID);
        void UpdateOrder(OrderService order);
        void DeleteOrder(int id);
        OrderService FindOrderById(int id);
        IQueryable<OrderService> FindOrdersInPage(int pageNumber, int pageSize);
        IQueryable<OrderService> FindOrdersByClient(string username, int pageNumber, int pageSize);
        IQueryable<OrderDetail> FindOrderDetailsByOrderId(int orderId);
        OrderPayment getPaymentById(int paymentID);
        IQueryable<OrderService> SearchOrdersInPage(int pageNumber, int pageSize, int type,string strSearch);
        OrderService FindOrderClientById(int id,string username);
        



        IQueryable<CategoryNew> FindAllCategory();
        int GetAboutCount();
        void AddAbout(About about);
        void UpdateAbout(About about);
        About FindAboutById(int id);
        IQueryable<About> FindAboutInPage(int pageNumber, int pageSize);

        void CommitChanges();
    }
}